What is is-builtin-module?
The is-builtin-module npm package is used to check if a given module name corresponds to a Node.js built-in module. This can be useful when developing tools that need to differentiate between built-in modules and third-party modules, such as bundlers, linters, or dependency analysis tools.
Check if a module is a built-in module
This feature allows you to check if a given string corresponds to a Node.js built-in module. In the code sample, 'fs' is recognized as a built-in module, while 'express' is not.
const isBuiltinModule = require('is-builtin-module');
console.log(isBuiltinModule('fs')); // true
console.log(isBuiltinModule('express')); // false